<template>
	<div class="video-cover-mask" v-if="showVideoCover" @click="clickHandler">
		<img class="start-btn" src="../assets/img/start-btn.png" alt="">
	</div>
</template>
<script type="text/javascript">
	export default {
		props: {
			goodsItem: {
				required: true
			}
		},
		data() {
			return {
				showVideoCover: this.goodsItem.actionType=="selfDefLink"&&/\.(mp4|mov)/.test(this.goodsItem.selfDefLink)
			}
		},
		methods: {
			clickHandler() {
				this.$emit("click");
			}
		}
	}
</script>